Tcl Source Code

Check-in [ee821ec00f]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Proposed fix for [63449c0514]: [namespace children] doesn't match non-glob patterns below the global namespace
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | bug-63449c0514
Files: files | file ages | folders
SHA3-256: ee821ec00fb0f615bc0b72874cef705b956b913d6c76007880123a65fc955258
User & Date: jan.nijtmans 2024-12-13 14:53:09.024
References
2024-12-13
15:06 Ticket [63449c0514] namespace children doesn't match non-glob patterns below the global namespace status still Open with 3 other changes artifact: 07b1d44ba1 user: jan.nijtmans
Context
2024-12-14
23:38
Fix [63449c0514]: [namespace children] doesn't match non-glob patterns below the global namespace. ... check-in: b6ae5707d9 user: jan.nijtmans tags: trunk, main
2024-12-13
14:53
Proposed fix for [63449c0514]: [namespace children] doesn't match non-glob patterns below the global... Closed-Leaf check-in: ee821ec00f user: jan.nijtmans tags: bug-63449c0514
13:54
taming constants with enums in the zipfs code; it's still ugly but it's not so awful as it was (and ... check-in: 5a3380a837 user: dkf tags: trunk, main
Changes
Unified Diff Ignore Whitespace Patch
Changes to generic/tclNamesp.c.
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
    listPtr = Tcl_NewListObj(0, NULL);
    if ((pattern != NULL) && TclMatchIsTrivial(pattern)) {
	size_t length = strlen(nsPtr->fullName);

	if (strncmp(pattern, nsPtr->fullName, length) != 0) {
	    goto searchDone;
	}
	if (FindChildEntry(nsPtr, pattern+length) != NULL) {
	    Tcl_ListObjAppendElement(NULL, listPtr,
		    Tcl_NewStringObj(pattern, -1));
	}
	goto searchDone;
    }
    entryPtr = FirstChildEntry(nsPtr, &search);
    while (entryPtr != NULL) {







|







3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
    listPtr = Tcl_NewListObj(0, NULL);
    if ((pattern != NULL) && TclMatchIsTrivial(pattern)) {
	size_t length = strlen(nsPtr->fullName);

	if (strncmp(pattern, nsPtr->fullName, length) != 0) {
	    goto searchDone;
	}
	if (FindChildEntry(nsPtr, (nsPtr != globalNsPtr ? 2 : 0) + pattern+length) != NULL) {
	    Tcl_ListObjAppendElement(NULL, listPtr,
		    Tcl_NewStringObj(pattern, -1));
	}
	goto searchDone;
    }
    entryPtr = FirstChildEntry(nsPtr, &search);
    while (entryPtr != NULL) {